<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:73:"D:\wamp\www\TP5\tp5\public/../application/index\view\Goods\goodsinfo.html";i:1528099170;}*/ ?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>商品详情</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">

		<link href="/static/home/AmazeUI-2.4.2/assets/css/admin.css" rel="stylesheet" type="text/css" />
		<link href="/static/home/AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css" />
		<link href="/static/home/basic/css/demo.css" rel="stylesheet" type="text/css" />
		<link type="text/css" href="/static/home/css/optstyle.css" rel="stylesheet" />
		<link type="text/css" href="/static/home/css/style.css" rel="stylesheet" />

		<script type="text/javascript" src="/static/home/basic/js/jquery-1.7.min.js"></script>
		<script type="text/javascript" src="/static/home/basic/js/quick_links.js"></script>

		<script type="text/javascript" src="/static/home/AmazeUI-2.4.2/assets/js/amazeui.js"></script>
		<script type="text/javascript" src="/static/home/js/jquery.imagezoom.min.js"></script>
		<script type="text/javascript" src="/static/home/js/jquery.flexslider.js"></script>
		<script type="text/javascript" src="/static/home/js/list.js"></script>

</head>
<body>
		<!--顶部导航条 -->
		<div class="am-container header">
			<ul class="message-r">
				<div class="topMessage home">
					<div class="menu-hd"><a href="#" target="_top" class="h">商城首页</a></div>
				</div>
				<div class="topMessage my-shangcheng">
					<div class="menu-hd MyShangcheng"><a href="#" target="_top"><i class="am-icon-user am-icon-fw"></i>个人中心</a></div>
				</div>
				<div class="topMessage mini-cart">
					<div class="menu-hd"><a id="mc-menu-hd" href="#" target="_top"><i class="am-icon-shopping-cart  am-icon-fw"></i><span>购物车</span><strong id="J_MiniCartNum" class="h">0</strong></a></div>
				</div>
				<div class="topMessage favorite">
					<div class="menu-hd"><a href="#" target="_top"><i class="am-icon-heart am-icon-fw"></i><span>收藏夹</span></a></div>
			</ul>
			</div>

			<!--悬浮搜索框-->

			<div class="nav white">
				<div class="logoBig" style="position:relative;top:-15px;right:120px;"> 
			     <li><img src="/static/home/images/aishang.png" /></li> 
			    </div> 
				<div class="search-bar pr">
					<a name="index_none_header_sysc" href="#"></a>
					<form action="/home/goods" method="post"> 
				      <input id="searchInput" name="search" type="text" placeholder="搜索" autocomplete="off" /> 
				      <input id="ai-topsearch" class="submit am-btn" value="搜索" index="1" type="submit" /> 
				     </form> 
				</div>
			</div>

			<div class="clear"></div>
            <b class="line"></b>
			<div class="listMain">

				<!--分类-->
			<div class="nav-table">
					   <div class="long-title"><span class="all-goods">全部分类</span></div>
					   <div class="nav-cont">
							<ul>
								<li class="index"><a href="/home/index">首页</a></li>
                               <?php if(is_array($brand) || $brand instanceof \think\Collection || $brand instanceof \think\Paginator): if( count($brand)==0 ) : echo "" ;else: foreach($brand as $key=>$bra): ?>
      								<li class="qc"><a href="/home/brand/id/<?php echo $bra['id']; ?>"><?php echo $bra['brand']; ?></a></li>
  								<?php endforeach; endif; else: echo "" ;endif; ?>
							</ul>
						    <div class="nav-extra">
						    	<i class="am-icon-user-secret am-icon-md nav-user"></i><b></b>我的福利
						    	<i class="am-icon-angle-right" style="padding-left: 10px;"></i>
						    </div>
						</div>
			</div>
				<ol class="am-breadcrumb am-breadcrumb-slash">
					<li><a href="#">首页</a></li>
					<li><a href="#">分类</a></li>
					<li class="am-active">商品详情</li>
				</ol>
				<script type="text/javascript">
					$(function() {});
					$(window).load(function() {
						$('.flexslider').flexslider({
							animation: "slide",
							start: function(slider) {
								$('body').removeClass('loading');
							}
						});
					});
				</script>
				<div class="scoll">
					<section class="slider">
						<div class="flexslider">
							<ul class="slides">
								<li>
									<img src="../images/01.jpg" title="pic" />
								</li>
								<li>
									<img src="../images/02.jpg" />
								</li>
								<li>
									<img src="../images/03.jpg" />
								</li>
							</ul>
						</div>
					</section>
				</div>



				<!--放大镜-->

				<div class="item-inform">
					<div class="clearfixLeft" id="clearcontent">

						<div class="box">
							<script type="text/javascript">
								$(document).ready(function() {
									$(".jqzoom").imagezoom();
									$("#thumblist li a").click(function() {
										$(this).parents("li").addClass("tb-selected").siblings().removeClass("tb-selected");
										$(".jqzoom").attr('src', $(this).find("img").attr("mid"));
										$(".jqzoom").attr('rel', $(this).find("img").attr("big"));
									});
								});
							</script>
							<div class="tb-booth tb-pic tb-s310">
								<img src="/uploads/<?php echo $goodsinfo['pic']; ?>" style="height:380px;width:380px;">
							</div>
							<!-- <div class="tb-booth tb-pic tb-s310">
								<a href="/static/home/images/01.jpg"><img src="/static/home/images/01_mid.jpg" alt="细节展示放大镜特效" rel="/static/home/images/01.jpg" class="jqzoom" /></a>
							</div> -->
							
						</div>

						<div class="clear"></div>
					</div>

					<div class="clearfixRight">

						<!--规格属性-->
						<!--名称-->
						<div class="tb-detail-hd">
							<h1>	
				<?php echo $goodsinfo['name']; ?>
	          </h1>
						</div>
						<div class="tb-detail-list">
							<!--价格-->
							<div class="tb-detail-price">
								<li class="price iteminfo_price">
									<dt>促销价</dt>
									<dd><em>¥</em><b class="sys_item_price"><?php echo $goodsinfo['price']; ?>.00</b>  </dd>                                 
								</li>
								<li class="price iteminfo_mktprice">
									<dt>原价</dt>
									<dd><em>¥</em><b class="sys_item_mktprice">(<?php echo $goodsinfo['price']*2; ?>).00</b></dd>									
								</li>
								<div class="clear"></div>
							</div>
							
							<div class="tb-detail-price">             
								<li class="price iteminfo_mktprice">
									<dt>商品描述</dt>
									<dt><?php echo $goodsinfo['descr']; ?></dt>								
								</li>
								<div class="clear"></div>
							</div>
							<!--地址-->
							<!-- <dl class="iteminfo_parameter freight">
								&nbsp;
							</dl>
							<div class="clear"></div> -->
						
							<!--销量-->
							<!-- <ul class="tm-ind-panel">
								<li class="tm-ind-item tm-ind-sellCount canClick">
									<div class="tm-indcon"><span class="tm-label">月销量</span><span class="tm-count">1015</span></div>
								</li>
								<li class="tm-ind-item tm-ind-sumCount canClick">
									<div class="tm-indcon"><span class="tm-label">累计销量</span><span class="tm-count">6015</span></div>
								</li>
								<li class="tm-ind-item tm-ind-reviewCount canClick tm-line3">
									<div class="tm-indcon"><span class="tm-label">累计评价</span><span class="tm-count">640</span></div>
								</li>
							</ul> -->
							<div class="clear"></div>

							<!--各种规格-->
							<dl class="iteminfo_parameter sys_item_specpara">
								<dt class="theme-login"><div class="cart-title">可选规格<span class="am-icon-angle-right"></span></div></dt>
								<dd>
									<!--操作页面-->

									<div class="theme-popover-mask"></div>

									<div class="theme-popover">
										<div class="theme-span"></div>
										<div class="theme-poptit">
											<a href="javascript:;" title="关闭" class="close">×</a>
										</div>
										<div class="theme-popbod dform">
											<form class="theme-signin" name="loginform" action="" method="post">

												<div class="theme-signin-left">

													<div class="theme-options">
														<div class="cart-title">口味</div>
														<ul>
															<li class="sku-line selected">原味<i></i></li>
															<li class="sku-line">奶油<i></i></li>
															<li class="sku-line">炭烧<i></i></li>
															<li class="sku-line">咸香<i></i></li>
														</ul>
													</div>
													<div class="theme-options">
														<div class="cart-title">包装</div>
														<ul>
															<li class="sku-line selected">手袋单人份<i></i></li>
															<li class="sku-line">礼盒双人份<i></i></li>
															<li class="sku-line">全家福礼包<i></i></li>
														</ul>
													</div>
													<div class="theme-options">
														<div class="cart-title number">数量</div>
														<dd>
															<input id="min" class="am-btn jian" name="<?php echo $goodsinfo['id']; ?>" type="button" value="-" />
															<input id="text_box" name="" type="text"  class="gnum" value="1" style="width:30px;" />
															<input id="add" class="am-btn jia" name="<?php echo $goodsinfo['id']; ?>" type="button" value="+" />
															<span id="Stock" class="tb-hidden">库存<span class="stock"><?php echo $goodsinfo['num']; ?></span>件</span>
														</dd>

													</div>
													<div class="clear"></div>

													<!-- <div class="btn-op">
														<div class="btn am-btn am-btn-warning">确认</div>
														<div class="btn close am-btn am-btn-warning">取消</div>
													</div>
												</div>
												<div class="theme-signin-right">
													<div class="img-info">
														<img src="/static/home/images/songzi.jpg" />
													</div>
													<div class="text-info">
														<span class="J_Price price-now">¥39.00</span>
														<span id="Stock" class="tb-hidden">库存<span class="stock"><?php echo $goodsinfo['num']; ?></span>件</span>
													</div> -->
												</div>

											</form>
										</div>
									</div>

								</dd>
							</dl>
							<div class="clear"></div>
							<!--活动	-->
							<div class="shopPromotion gold">
								<div class="hot">
									<dt class="tb-metatit">店铺优惠</dt>
									<div class="gold-list">
										<p>购物满2件打8折，满3件7折<span>点击领券<i class="am-icon-sort-down"></i></span></p>
									</div>
								</div>
								<div class="clear"></div>
								<div class="coupon">
									<dt class="tb-metatit">优惠券</dt>
									<div class="gold-list">
										<ul>
											<?php if(is_array($coupon) || $coupon instanceof \think\Collection || $coupon instanceof \think\Paginator): if( count($coupon)==0 ) : echo "" ;else: foreach($coupon as $key=>$cu): ?>
											<li class="coupon" cu="<?php echo $cu['id']; ?>"><?php echo $cu['name']; ?></li>
											<?php endforeach; endif; else: echo "" ;endif; ?>
										</ul>
									</div>
								</div>
							</div>
						</div>

						<div class="pay">
							<div class="pay-opt">
							<a href="home.html"><span class="am-icon-home am-icon-fw">首页</span></a>
							<a><span class="am-icon-heart am-icon-fw">收藏</span></a>
							
							</div>
							<li>
								<div class="clearfix tb-btn tb-btn-buy theme-login">
									<a id="LikBuy" title="点此按钮到下一步确认购买信息" href="#">添加到收藏</a>
								</div>
							</li>
							<li>
								<div class="clearfix tb-btn tb-btn-basket theme-login">
									<a id="LikBasket" class="c" title="加入购物车" href="/cart/addcart/id/<?php echo $goodsinfo['id']; ?>/gnum/1"><i></i>加入购物车</a>
								</div>
							</li>
						</div>

					</div>

					<div class="clear"></div>

				</div>

			
				
							
				<!-- introduce-->

				<div class="introduce">
					<div class="browse">
					    <!-- <div class="mc"> 
						     <ul>					    
						     	<div class="mt">            
						            <h2>看了又看</h2>        
					            </div>
						     	
							      <li class="first">
							      	<div class="p-img">                    
							      		<a  href="#"> <img class="" src="/static/home/images/browse1.jpg"> </a>               
							      	</div>
							      	<div class="p-name"><a href="#">
							      		【三只松鼠_开口松子】零食坚果特产炒货东北红松子原味
							      	</a>
							      	</div>
							      	<div class="p-price"><strong>￥35.90</strong></div>
							      </li>
							      <li>
							      	<div class="p-img">                    
							      		<a  href="#"> <img class="" src="/static/home/images/browse1.jpg"> </a>               
							      	</div>
							      	<div class="p-name"><a href="#">
							      		【三只松鼠_开口松子】零食坚果特产炒货东北红松子原味
							      	</a>
							      	</div>
							      	<div class="p-price"><strong>￥35.90</strong></div>
							      </li>
							      <li>
							      	<div class="p-img">                    
							      		<a  href="#"> <img class="" src="/static/home/images/browse1.jpg"> </a>               
							      	</div>
							      	<div class="p-name"><a href="#">
							      		【三只松鼠_开口松子】零食坚果特产炒货东北红松子原味
							      	</a>
							      	</div>
							      	<div class="p-price"><strong>￥35.90</strong></div>
							      </li>							      
							      <li>
							      	<div class="p-img">                    
							      		<a  href="#"> <img class="" src="/static/home/images/browse1.jpg"> </a>               
							      	</div>
							      	<div class="p-name"><a href="#">
							      		【三只松鼠_开口松子】零食坚果特产炒货东北红松子原味
							      	</a>
							      	</div>
							      	<div class="p-price"><strong>￥35.90</strong></div>
							      </li>							      
							      <li>
							      	<div class="p-img">                    
							      		<a  href="#"> <img class="" src="/static/home/images/browse1.jpg"> </a>               
							      	</div>
							      	<div class="p-name"><a href="#">
							      		【三只松鼠_开口松子218g】零食坚果特产炒货东北红松子原味
							      	</a>
							      	</div>
							      	<div class="p-price"><strong>￥35.90</strong></div>
							      </li>							      
					      
						     </ul>					
					    </div> -->
					</div>
					<div class="introduceMain">
						<div class="am-tabs" data-am-tabs>
							<ul class="am-avg-sm-3 am-tabs-nav am-nav am-nav-tabs">
								<!-- <li class="am-active">
									<a href="#">

										<span class="index-needs-dt-txt">宝贝详情</span></a>

								</li> -->

								<li>
									<a href="#">

										<span class="index-needs-dt-txt">全部评价 (<?php echo $count; ?>)</span></a>

								</li>

								<!-- <li>
									<a href="#">

										<span class="index-needs-dt-txt">猜你喜欢</span></a>
								</li> -->
							</ul>

							<div class="am-tabs-bd">

								<div class="am-tab-panel am-fade">
<?php if(is_array($eva) || $eva instanceof \think\Collection || $eva instanceof \think\Paginator): if( count($eva)==0 ) : echo "" ;else: foreach($eva as $key=>$eva): ?>	
									
                                    

									<ul class="am-comments-list am-comments-list-flip">
										<li class="am-comment">
											<!-- 评论容器 -->
											<a href="">
												<img class="am-comment-avatar" src="/static/home/images/hwbn40x40.jpg" />
												<!-- 评论者头像 -->
											</a>

											<div class="am-comment-main">
												<!-- 评论内容容器 -->
												<header class="am-comment-hd">
													<!--<h3 class="am-comment-title">评论标题</h3>-->
													<div class="am-comment-meta">
														<!-- 评论元数据 -->
														<a href="#link-to-user" class="am-comment-author"><?php echo $eva['tel']; ?>(匿名)</a>
														<!-- 评论者 -->
														评论于
														<time datetime=""><?php echo $eva['time']; ?></time>
													</div>
												</header>

												<div class="am-comment-bd">
													<div class="tb-rev-item " data-id="255776406962">
														<div class="J_TbcRate_ReviewContent tb-tbcr-content ">
															<?php echo $eva['content']; ?>
														</div>
														<!-- <div class="tb-r-act-bar">
															颜色分类：柠檬黄&nbsp;&nbsp;尺码：S
														</div> -->
													</div>

												</div>
												<!-- 评论内容 -->
											</div>
										</li>
						
									</ul>
<?php endforeach; endif; else: echo "" ;endif; ?>
									<div class="clear"></div>


									<!--分页 -->
									<!-- <ul class="am-pagination am-pagination-right">
										<li class="am-disabled"><a href="#">&laquo;</a></li>
										<li class="am-active"><a href="#">1</a></li>
										<li><a href="#">2</a></li>
										<li><a href="#">3</a></li>
										<li><a href="#">4</a></li>
										<li><a href="#">5</a></li>
										<li><a href="#">&raquo;</a></li>
									</ul>
									<div class="clear"></div> -->


								</div>

								
							</div>

						</div>

						<div class="clear"></div>


	<?php echo widget("Cate/footer"); ?>
</body>
<script>
	 $(".jian").click(function(){
	 	id=$(this).attr("name");
    	ob=$(this);
    	a=$(".gnum").val();
    	// alert(a);
    	//ajax传递id参数
    	$.get("/goodsinfo/jian",{id:id,a:a},function(data){
    		//赋值数量
    		ob.next("input").val(data);
    		// alert(data);
    		// 增加参数使其存入seesion中
    		$(".c").attr("href","/cart/addcart/id/<?php echo $goodsinfo['id']; ?>/gnum/"+data);
    	},'json')

    	// alert(id);
	 })

	 $(".jia").click(function(){
	 	id=$(this).attr("name");
    	ob=$(this);
    	a=$(".gnum").val();
    	//ajax
    	$.get("/goodsinfo/jia",{id:id,a:a},function(data){
    		//赋值数量
    		ob.prev("input").val(data);
    		// alert(data);
    		//增加参数使其存入session中
    		$(".c").attr("href","/cart/addcart/id/<?php echo $goodsinfo['id']; ?>/gnum/"+data);
    	},'json');
	 })

	 $(".coupon").click(function(){
	 	id=$(this).attr("cu");
	 	statu=1;
	 	ob=$(this);
	 	$.get("/goodsinfo/coupon",{id:id,statu:statu},function(data){
	 		if(data==1){
	 			// alert('领取成功');
	 			ob.find('li').html('领取成功');
	 		}
	 	});
	 });
</script>
</html>